import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/home_room_entity.dart';

HomeRoomEntity $HomeRoomEntityFromJson(Map<String, dynamic> json) {
	final HomeRoomEntity homeRoomEntity = HomeRoomEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		homeRoomEntity.code = code;
	}
	final HomeRoomObj? obj = jsonConvert.convert<HomeRoomObj>(json['obj']);
	if (obj != null) {
		homeRoomEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		homeRoomEntity.msg = msg;
	}
	return homeRoomEntity;
}

Map<String, dynamic> $HomeRoomEntityToJson(HomeRoomEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] = entity.obj.toJson();
	data['msg'] = entity.msg;
	return data;
}

HomeRoomObj $HomeRoomObjFromJson(Map<String, dynamic> json) {
	final HomeRoomObj homeRoomObj = HomeRoomObj();
	final List<HomeRoomObjList>? list = jsonConvert.convertListNotNull<HomeRoomObjList>(json['list']);
	if (list != null) {
		homeRoomObj.list = list;
	}
	return homeRoomObj;
}

Map<String, dynamic> $HomeRoomObjToJson(HomeRoomObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['list'] =  entity.list.map((v) => v.toJson()).toList();
	return data;
}

HomeRoomObjList $HomeRoomObjListFromJson(Map<String, dynamic> json) {
	final HomeRoomObjList homeRoomObjList = HomeRoomObjList();
	final int? roomId = jsonConvert.convert<int>(json['roomId']);
	if (roomId != null) {
		homeRoomObjList.roomId = roomId;
	}
	final String? cityName = jsonConvert.convert<String>(json['cityName']);
	if (cityName != null) {
		homeRoomObjList.cityName = cityName;
	}
	final String? communityName = jsonConvert.convert<String>(json['communityName']);
	if (communityName != null) {
		homeRoomObjList.communityName = communityName;
	}
	final String? buildingName = jsonConvert.convert<String>(json['buildingName']);
	if (buildingName != null) {
		homeRoomObjList.buildingName = buildingName;
	}
	final String? unitName = jsonConvert.convert<String>(json['unitName']);
	if (unitName != null) {
		homeRoomObjList.unitName = unitName;
	}
	final String? roomName = jsonConvert.convert<String>(json['roomName']);
	if (roomName != null) {
		homeRoomObjList.roomName = roomName;
	}
	return homeRoomObjList;
}

Map<String, dynamic> $HomeRoomObjListToJson(HomeRoomObjList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['roomId'] = entity.roomId;
	data['cityName'] = entity.cityName;
	data['communityName'] = entity.communityName;
	data['buildingName'] = entity.buildingName;
	data['unitName'] = entity.unitName;
	data['roomName'] = entity.roomName;
	return data;
}